package com.zx.mes.rabbitmq.hyl.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * rabbitMQ 队列配置
 * @author hyl
 * @date 2018-3-16
 */
@Configuration
public class RabbitConfig {

    private static final Logger logger = LoggerFactory.getLogger(RabbitConfig.class);

    private static final String HELLO_QUEUE="hello";

    private static final String OBJECT_QUEUE="object";

    @Bean
    public Queue helloQueue(){
         logger.info("HELLO_QUEUE 创建");
        return new Queue(HELLO_QUEUE);
    }

    @Bean
    public Queue objectQueue(){
        logger.info("OBJECT_QUEUE 创建");
        return new Queue(OBJECT_QUEUE);
    }
}
